---
title: Data.toString()
api: Data.toString
---

## Description

<Summary/>

The following options are supported for the _encoding_ parameter:

- _"utf8" (default)_ - Encode the text as UTF-8
- _"hex"_ - Decode the text as hexadecimal representation
- _"base64"_ - Decode the text as Base64 format
- _"base64url"_ - Decode the text as Base64URL format

## Syntax

``` js
data.toString()
data.toString(encoding)
```

## Parameters

<Parameters/>

## See Also

* [Data](/reference/api/Data)
* [Data.from()](/reference/api/Data/from)
